import { defineStore } from 'pinia';
// DictStore
export const DictStore = defineStore({
  id: 'dict',
  state: () => ({
    dictData: {},
  }),
  actions: {
    // 设置字典
    setDictData(dictName, dictData) {
      this.dictData[dictName] = dictData;
    },
    // 清除字典
    clearDictData(dictName) {
      this.dictData[dictName] ? delete this.dictData[dictName] : null;
    },
  },
});
